package com.example.account_book.frag_record;


import com.example.account_book.R;
import com.example.account_book.db.DBManger;
import com.example.account_book.db.TypeBean;

import java.util.List;

/**
 *
 */
public class OutcomeFragment extends BaseRecordFragment {

    @Override
    public void loadDataToGV() {
        super.loadDataToGV();
        //获取数据库当中的数据源
        List<TypeBean> outlist = DBManger.getTypeList(0);
        typeList.addAll(outlist);
        adapter.notifyDataSetChanged();
        typeTv.setText("其他");
        typeIv.setImageResource(R.mipmap.other);
    }

    @Override
    public void saveAccountToDB() {
        accountBean.setKind(0);
        DBManger.insertItemToAccounttb(accountBean);
    }
}